Add Users
2015/11/21 |
[1] | Add a new user account. |
localhost:~ # useradd -m suse localhost:~ # passwd suse New password: # set password Retype new password: # confirm passwd: password updated successfully localhost:~ # # logout |
[2] | Try to switch to a user that was added above. |
localhost login: suse # nput user name password: # password suse@localhost:~> su - # switch to root Password: # root password localhost:~ # # just switched to root |
[3] | Make a user (it's [suse] in this example) be only a user who can su to others. |
localhost:~ # usermod -G wheel root localhost:~ # usermod -G wheel suse
localhost:~ #
vi /etc/pam.d/su # line 2: add auth required pam_wheel.so
localhost:~ #
vi /etc/pam.d/su-l # line 2: add auth required pam_wheel.so |